package br.com.cartools.entity.payment;

import br.com.cartools.entity.so.ServiceOrder;

public class Bill {

	private Integer id;
	private IPayment payment;
	private ServiceOrder serviceOrder;
	
	public Bill(){
		
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public IPayment getPayment() {
		return payment;
	}

	public void setPayment(IPayment payment) {
		this.payment = payment;
	}

	public ServiceOrder getServiceOrder() {
		return serviceOrder;
	}

	public void setServiceOrder(ServiceOrder serviceOrder) {
		this.serviceOrder = serviceOrder;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((payment == null) ? 0 : payment.hashCode());
		result = prime * result
				+ ((serviceOrder == null) ? 0 : serviceOrder.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Bill other = (Bill) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (payment == null) {
			if (other.payment != null)
				return false;
		} else if (!payment.equals(other.payment))
			return false;
		if (serviceOrder == null) {
			if (other.serviceOrder != null)
				return false;
		} else if (!serviceOrder.equals(other.serviceOrder))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "Bill [id=" + id + ", payment=" + payment + ", serviceOrder="
				+ serviceOrder + "]";
	}
	
	
	
}
